home *** CD-ROM | disk | FTP | other *** search
- ; $VER: Install_FetchRefs 1.1 (19.10.94)
- ; By Anders Melchiorsen
-
- (message (cat
- " \n"
- "FetchRefs 1.1 \n"
- "By Anders Melchiorsen \n"
- " \n"
- "A feature packed utility that provides you with\n"
- "the most comfortable access to your AutoDoc and\n"
- "include file references. \n"
- " \n"
- "Using: \n"
- "· reqtools.library, copyright Nico François \n"
- "· triton.library, copyright Stefan Zeiger \n"
- " \n"
- "FetchRefs is freely distributeable, providing \n"
- "that the distribution is left unchanged. \n"
- ))
-
- ; Don't bother to install on pre-2.04 machines
- (if (< (/ (getversion) 65536) 37)
- (
- (message (cat
- "You need at least Kickstart 2.04 to use FetchRefs.\n"
- "\n"
- "Therefore it would be a complete waste of both \n"
- "your time and disk space to install it, and we're \n"
- "not going to do it. Sorry - get upgraded! \n"
- )
- )
- (exit (quiet))
- )
- )
-
- (set @default-dest "")
- (welcome)
-
- ; Install FetchRefs (default: in SYS:WBStartup)
- (set frto "SYS:WBStartup")
-
- (if (= @user-level 2)
- (set frto (askdir (prompt "Select drawer to place FetchRefs into")
- (default frto)
- (help (cat
- "You now have to select where to put FetchRefs.\n"
- "\n"
- "Installing FetchRefs in your WBStartup drawer "
- "is a good idea as you then do not have to do "
- "anything further; it will start itself "
- "automatically, everytime you reboot.\n"
- "\n"
- "If you select to put FetchRefs somewhere else, "
- "then you will have to edit your s:user-startup "
- "file to make it start FetchRefs automatically; "
- "this is obviously not as convinient."
- )
- )
- )
- )
- )
-
- (copyfiles (source "FetchRefs")
- (dest frto)
- (infos)
- (optional "force")
- )
-
- (tooltype (dest (tackon frto "FetchRefs"))
- (noposition)
- )
-
- ; Install GenerateIndex (default: in SYS:Tools)
- (set grto "SYS:Tools")
-
- (if (= @user-level 2)
- (set grto (askdir (prompt "Select drawer to place GenerateIndex into")
- (default grto)
- (help (cat
- "GenerateIndex is the index file generator "
- "for FetchRefs and is required before you "
- "can use ot at anything. The default of this "
- "installation script is to put GenerateIndex "
- "in your SYS:Tools drawer.\n"
- "\n"
- "If you chose not to install GenerateIndex in "
- "the SYS:Tools drawer then you will have to "
- "specify somewhere else to put it. It is not "
- "important where you put it; it's entirely up "
- "to you and your taste/disk structure."
- )
- )
- )
- )
- )
-
- (copyfiles (source "GenerateIndex")
- (dest grto)
- (infos)
- (optional "force")
- )
-
- (tooltype (dest (tackon grto "GenerateIndex"))
- (noposition)
- )
-
- ; Install ARexx script for editor
- (set editor
- (askchoice (prompt "Which text editor are you using?")
- (choices "Unsupported editor" "AmokEd" "CygnusEd" "DME" "GoldED" "TurboText")
- (help (cat
- "You need to specify what editor you're using because "
- "FetchRefs relies on an ARexx script in order to "
- "interface correctly to the editor. This script is "
- "different for all editors and therefore it is vital "
- "to install the right one.\n"
- "\n"
- "If you currently use an editor that is not "
- "supported, you may be able to create a "
- "script yourself. If not, you're probably out "
- "of luck. The existing scripts may be helpful "
- "if you want to make your own, so if you "
- "don't clarify what editor you use, all "
- "scripts will get installed; then you can snoop "
- "at them all."
- )
- )
- )
- )
-
- (set rxto "REXX:")
-
- (if (= @user-level 2)
- (set rxto (askdir (prompt "Select drawer to place ARexx scripts into")
- (default rxto)
- (help (cat
- "If you select to put the ARexx scripts in "
- "your REXX: drawer, you will probably do just fine.\n"
- "\n"
- "However, some prefer to have a seperate drawer "
- "for scripts to each and every program, and in "
- "such a case you will need to specify where you "
- "want the FetchRefs script to go (which should "
- "be in the drawer for your editor, then)."
- )
- )
- )
- )
- )
-
- (set patt (select editor "GoFetchRefs.~(rexx)"
- "GoFetchRefs.aed"
- "GoFetchRefs.ced"
- "GoFetchRefs.dme"
- "GoFetchRefs.ged"
- "GoFetchRefs.ttx"
- )
- )
-
- (copyfiles (source "Rexx")
- (dest rxto)
- (pattern patt)
- (optional "force")
- )
-
- ; Install ARexx script for Shell usage
- (set shell_rxto "REXX:")
- (set shell_rexx 1)
-
- (if (= @user-level 2)
- (if (askbool (prompt (cat "Install the ARexx script to use\n"
- "FetchRefs from the Shell?"
- )
- )
-
- (help (cat
- "This script is used if you want to interface "
- "FetchRefs from your Shell. It will simply print "
- "the reference to the Shell window when you use "
- "the script: 'rx GoFetchRefs <reference>'. You do not "
- "even need an editor to use FetchRefs this way!"
- )
- )
- )
-
- ; then
-
- (set shell_rxto (askdir (prompt "Select drawer to place the Shell ARexx script into")
- (default shell_rxto)
- (help (cat
- "You must now select where you want the "
- "ARexx script of FetchRefs to be placed. "
- "Probably the most logical place is REXX:"
- )
- )
- )
- )
-
- ; else
-
- (set shell_rexx 0)
- )
- )
-
- (if (= shell_rexx 1)
- (copyfiles (source "Rexx/GoFetchRefs.rexx")
- (dest shell_rxto)
- (optional "force")
- )
- )
-
- ; Check for triton.library and install if supplied version is more current
- (set new_version (getversion "Triton/triton.library"))
- (set her_version (getversion "LIBS:triton.library"))
- (set install_triton 0)
-
- (set extramsg (cat
- "\n"
- "triton.library is required if you intend to \n"
- "use the GUI of the index file generator for \n"
- "FetchRefs. \n"
- )
- )
-
- (if (= her_version 0)
- (set install_triton
- (if (= @user-level 2)
- (askbool (prompt "Install triton.library?")
- (help (cat
- "You don't have triton.library installed! \n"
- extramsg
- )
- )
- )
- ; else
- 1
- )
- )
- ; else
- (if (< her_version new_version)
- (set install_triton
- (if (= @user-level 2)
- (askbool (prompt "Install new triton.library?")
- (help (cat
- "You have an old version of Triton installed.\n"
- "FetchRefs requires at least version 2. \n"
- "\n"
- ("Your version: %3ld.%-4ld \n" (/ her_version 65536) (- her_version (* (/ her_version 65536) 65536)))
- ("Version to install:%3ld.%-4ld \n" (/ new_version 65536) (- new_version (* (/ new_version 65536) 65536)))
- extramsg
- )
- )
- )
- ; else
- 1
- )
- )
- )
- )
-
- (if (= install_triton 1)
- (copyfiles
- (source "Triton/triton.library")
- (dest "LIBS:")
- (optional "force")
- )
- )
-
- ; Check for reqtools.library v38
- (set extramsg (cat
- "\n"
- "reqtools.library is freely distributeable \n"
- "and available from PD sources everywhere. \n"
- "\n"
- "Note, however, that reqtools.library is only\n"
- "required if you intend to use the GUI of the\n"
- "index file generator for FetchRefs (contact \n"
- "the guide for further information). \n"
- )
- )
-
- (if (exists "LIBS:reqtools.library" (noreq))
- (if ( < (/ (getversion "LIBS:reqtools.library") 65536) 38)
- (message (cat
- "Your version of reqtools.library is too old.\n"
- "\n"
- "You should look around for a newer version \n"
- "of reqtools.library - at least version 38 \n"
- "(release 2) is required. \n"
- extramsg
- )
- )
- )
-
- (message (cat
- "You don't have reqtools.library installed; this \n"
- "is required for optimal performance, so you \n"
- "should look around for it. \n"
- extramsg
- )
- )
- )
-
- ; Print final status report
- (message (cat
- "FetchRefs is installed in \n"
- ("%-53s\n" frto)
-
- (if (= frto "SYS:WBStartup")
- "(You need to reboot for FetchRefs to auto-load) \n"
- "(Modify your s:user-startup to make it auto-start) \n"
- )
-
- "\n"
-
- "GenerateIndex is installed in \n"
- ("%-53s\n" grto)
- "\n"
-
- ("Installed ARexx scripts for: %-24s\n"
- (select editor
- "All editors"
- "AmokEd"
- "CygnusEd"
- "DME"
- "GoldED"
- "TurboText"
- )
- )
-
- (if (= shell_rexx 1)
- " and the Shell \n"
- )
-
- "\n"
-
- "You should now read the guide carefully and \n"
- "then make an index file. \n"
- "\n"
- "Happy fetching! \n"
- )
- )
-
- (exit (quiet))
-
-